/* ===== SHARED HEADER STYLES (MUST MATCH ALL PAGES) ===== */
.donation-popup-title {
  display: flex;
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* optional: center whole line */
  gap: 8px;
  /* space between text & logo */
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  position: relative;
  z-index: 10;
}

.top-left {
  display: flex;
  align-items: center;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 22px;
  text-decoration: none;
  color: inherit;
}

.brand-link:hover {
  text-decoration: none;
}

.logo-money {
  height: 34px;
  width: auto;
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.brand-text span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6b7280;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  gap: 22px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-nav a {
  text-decoration: none;
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

.header-nav a:hover {
  color: #7ed957;
}

/* DONATION SECTION */
.header-donate {
  display: flex;
  gap: 8px;
  align-items: center;
}

.donate-group {
  display: flex;
  align-items: center;
}

.header-donate .donate-group {
  display: flex !important;
  align-items: stretch !important;
}

.header-donate .donate-currency {
  padding: 8px 8px 8px 12px !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-right: none !important;
  border-radius: 4px 0 0 4px !important;
  font-size: 14px !important;
  font-weight: 500;
  color: #374151;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  display: flex !important;
  align-items: center !important;
  line-height: 1 !important;
}

.header-donate .donate-input {
  width: 50px !important;
  padding: 8px 10px 8px 0 !important;
  border: 1px solid #e5e7eb !important;
  border-left: none !important;
  border-right: none !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 500;
  color: #374151;
  background: #fff !important;
  text-align: left;
  outline: none !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  box-shadow: none !important;
  -moz-appearance: textfield !important;
}

.header-donate .donate-input::-webkit-outer-spin-button,
.header-donate .donate-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.header-donate .donate-input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: #e5e7eb !important;
}

.header-donate .donate-btn {
  padding: 8px 12px !important;
  background: #7ed957 !important;
  color: #fff !important;
  border: 1px solid #7ed957 !important;
  border-radius: 0 4px 4px 0 !important;
  font-size: 13px !important;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
  min-width: 60px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.header-donate .donate-btn:hover {
  background: #6bc943 !important;
  transform: none !important;
}

@media (max-width: 768px) {
  .main-header {
    padding: 20px 16px;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .top-left {
    width: 100%;
    order: 1;
    display: flex;
    justify-content: center;
  }

  .brand-link {
    gap: 16px;
    justify-content: center;
  }

  .logo-money {
    height: 32px;
  }

  .brand-text {
    text-align: center;
  }

  .brand-text h1 {
    font-size: 20px;
    margin: 0;
  }

  .brand-text span {
    font-size: 10px;
    margin-top: 4px;
  }

  .header-nav {
    position: static;
    transform: none;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: center;
    order: 2;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-nav a {
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-donate {
    order: 3;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    gap: 12px;
  }

  .header-donate .donate-group {
    flex: 0 0 auto;
  }

  .header-donate .donate-input {
    width: 45px !important;
    font-size: 13px !important;
  }

  .header-donate .donate-btn {
    font-size: 12px !important;
    padding: 8px 14px !important;
    min-width: 65px;
  }
}

/* ===== END SHARED HEADER STYLES ===== */

:root {
  --bg-page: #f6f8fb;
  --bg-hero-left: #ffffff;
  --bg-hero-right: #243145;
  --primary: #008c7a;
  --primary-light: #e6f5f2;
  --text-main: #202124;
  --text-muted: #5f6368;
  --border-light: #e0e4ec;
  --nav-gray: #6b7280;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
}

/* HERO (no longer used on guide page, kept for potential reuse) */

.hero {
  display: none;
}

/* Hero section for Invoicing Guide */
.guide-hero {
  background: transparent;
  /* remove dark background */
  padding: 20px 0 8px;
  /* reduce space below hero */
  display: flex;
  justify-content: center;
}

/* Centered hero image with target size 1211x512 (responsive) */
.guide-hero-image {
  width: 100%;
  max-width: 1050px;
  aspect-ratio: 1211 / 512;
  height: 400px;
  display: block;
  border-radius: 28px;
}

/* PAGE WRAPPER */

.page {
  max-width: 960px;
  margin: 0 auto;
  background: #ffffff;
  margin-top: 8px;
  /* tighter gap under hero */
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  padding: 32px 40px 40px;
}

/* TOP BAR */

.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.page-location {
  font-size: 14px;
  color: var(--text-muted);
}

/* TABLE OF CONTENTS DROPDOWN */

.toc {
  position: relative;
}

.toc-button {
  background: transparent;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  padding: 8px 14px;
  font-size: 14px;
  color: var(--primary);
  cursor: pointer;
}

.toc-menu {
  position: absolute;
  top: 115%;
  right: 0;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
  min-width: 220px;
  padding: 6px 0;
  display: none;
  z-index: 10;
}

.toc-menu.open {
  display: block;
}

.toc-item {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.toc-item:hover {
  background: var(--primary-light);
}

.toc-item.active {
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
}

/* CONTENT */

.content h2 {
  margin-top: 0;
  font-size: 28px;
}

.content h3 {
  font-weight: 500;
  color: var(--text-muted);
}

/* BOTTOM NAV */

.bottom-nav {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
}

.nav-button {
  min-width: 170px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--nav-gray);
  font-size: 14px;
  cursor: pointer;
}

.nav-button:disabled {
  opacity: 0.4;
  cursor: default;
}

.nav-prev::before {
  content: "← ";
}

.nav-next::after {
  content: " →";
}

/* RESPONSIVE */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-right {
    order: -1;
  }

  .page {
    margin: 16px;
    padding: 24px;
  }

  .bottom-nav {
    flex-direction: column;
    gap: 12px;
  }
}

/* Shared footer styles for non-home pages */
.efb-footer {
  background: #f8fafc;
  padding: 60px 0 28px;
  border-top: 1px solid #e5e7eb;
  color: #111827;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.efb-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.efb-footer-columns {
  display: flex;
  justify-content: space-between;
  gap: 80px;
  margin-bottom: 32px;
}

.efb-footer-col {
  flex: 1;
}

.efb-footer-col-right {
  max-width: 420px;
  text-align: right;
}

.efb-footer-heading {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 14px;
}

.efb-footer-link {
  display: block;
  font-size: 14px;
  color: #111827;
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s ease;
}

.efb-footer-link:link,
.efb-footer-link:visited {
  color: #111827;
}

.efb-footer-link:hover,
.efb-footer-link:active,
.efb-footer-link:focus {
  color: #7ed957;
  text-decoration: none;
}

.efb-footer-bottom a:hover,
.efb-footer-bottom a:focus {
  color: #7ed957;
}

.efb-social-btn:hover,
.efb-social-btn:focus {
  background: #7ed957;
  color: #000;
}

.efb-footer-social {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.efb-social-btn {
  width: 34px;
  height: 34px;
  background: #000;
  color: #fff;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
}

.efb-footer-links-secondary {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}

.efb-footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  text-align: center;
  font-size: 14px;
  color: #4b5563;
}

.efb-powered-name {
  color: #7ed957;
  font-weight: 700;
  margin-left: 4px;
  text-decoration: none;
}

.efb-powered-name:hover {
  text-decoration: underline;
}

.efb-footer-copy {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .efb-footer {
    padding: 40px 0 20px;
  }

  .efb-footer-inner {
    padding: 0 20px;
  }

  .efb-footer-columns {
    flex-direction: column;
    gap: 28px;
  }

  .efb-footer-col-right,
  .efb-footer-links-secondary,
  .efb-footer-social {
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
  /* same spacing */
  background: #ffffff;
}

.top-left {
  display: flex;
  align-items: center;
}

.logo-money {
  height: 32px;
  margin-right: 10px;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 600;
  color: #2d2d2d;
}

.brand-text span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
}

.main-header nav {
  display: flex;
  gap: 28px;
}

.main-header nav a {
  text-decoration: none;
  color: #111827;
  font-size: 14px;
  transition: color 0.3s;
}

.main-header nav a:hover {
  color: #7ed957;
}

/* HEADER CONTAINER */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 60px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

/* LEFT BRAND */
.top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-money {
  height: 34px;
}

.brand-text h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.brand-text span {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6b7280;
}

/* NAVIGATION */
.header-nav {
  display: flex;
  gap: 16px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  flex-wrap: nowrap;
}

.header-nav a {
  text-decoration: none;
  font-size: 14px;
  color: #111827;
  font-weight: 500;
  white-space: nowrap;
}

.header-nav a:hover {
  color: #7ed957;
}

@media (max-width: 768px) {
  .guide-hero-image {
    width: 100%;
    max-width: 1050px;
    aspect-ratio: 1211 / 512;
    height: 250px;
    display: block;
    border-radius: 28px;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .main-header {
    padding: 20px 1px;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .top-left {
    width: 100%;
    order: 1;
    display: flex;
    justify-content: center;
  }

  .brand-link {
    gap: 16px;
    justify-content: center;
  }

  .logo-money {
    height: 32px;
  }

  .brand-text {
    text-align: center;
  }

  .brand-text h1 {
    font-size: 20px;
    margin: 0;
  }

  .brand-text span {
    font-size: 10px;
    margin-top: 4px;
  }

  .header-nav {
    position: static;
    transform: none;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: center;
    order: 2;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-nav a {
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-donate {
    order: 3;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    gap: 12px;
  }

  .header-donate .donate-group {
    flex: 0 0 auto;
  }

  .header-donate .donate-input {
    width: 45px !important;
    font-size: 13px !important;
  }

  .header-donate .donate-btn {
    font-size: 12px !important;
    padding: 8px 14px !important;
    min-width: 65px;
  }
}

/* Donation Popup Styles */
.donation-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donation-popup-modal {
  background: #fff;
  border-radius: 12px;
  padding: 30px 40px;
  max-width: 420px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.donation-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: #666;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #fff;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.donation-popup-close:hover {
  background: #333;
}

.donation-popup-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  color: #111827;
}

.donation-popup-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.popup-donate-group {
  justify-content: center;
  display: inline-flex;
  align-items: stretch;
}

.popup-donate-group .donate-currency {
  padding: 8px 8px 8px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  display: flex;
  align-items: center;
}

.popup-donate-group .donate-input {
  width: 50px;
  padding: 8px 10px 8px 0;
  border: 1px solid #e5e7eb;
  border-left: none;
  border-right: none;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #fff;
  text-align: center;
  outline: none;
}

.donate-btn-display {
  padding: 8px 14px;
  background: #7ed957;
  color: #fff;
  border: 1px solid #7ed957;
  border-radius: 0 4px 4px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: default;
}

#paypal-button-container {
  width: 168px;
  margin: 15px auto 10px auto;
}

.donation-popup-powered {
  font-size: 13px;
  color: #666;
  margin-top: 15px;
  margin-bottom: 0;
}

.paypal-text {
  color: #003087;
  font-weight: 600;
  font-style: italic;
}

.paypal-text-pal {
  color: #009cde;
  font-weight: 600;
  font-style: italic;
}

@media (max-width: 480px) {
  .donation-popup-modal {
    padding: 25px 20px;
    margin: 15px;
  }

  .donation-popup-inputs {
    gap: 10px;
  }
}

/* INR Support Popup */
.inr-popup-modal {
  width: 420px;
  height: auto;
  padding: 28px 30px;
  border-radius: 16px;
}

.inr-popup-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.inr-qr-section {
  flex: 0 0 auto;
  text-align: center;
}

.inr-qr-img {
  width: 140px;
  height: 140px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.inr-qr-label {
  font-size: 11px;
  color: #6b7280;
  margin: 6px 0 0;
}

.inr-bank-details {
  flex: 1;
  text-align: left;
}

.inr-bank-table {
  width: 100%;
  border-collapse: collapse;
}

.inr-bank-table td {
  padding: 5px 6px;
  font-size: 12px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.inr-bank-table td:first-child {
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
  width: 55px;
  font-size: 11px;
}

.inr-bank-table td:last-child {
  font-weight: 600;
  color: #18181b;
}

.donation-popup-powered {
  font-size: 14px;
  color: #52525b;
  margin-top: 5px;
}

.donation-popup-close {
  top: 15px;
  right: 15px;
  background: #71717a;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.donation-popup-close:hover {
  background: #52525b;
}

@media (max-width: 480px) {
  .inr-popup-modal {
    width: 92vw;
    padding: 22px 16px;
  }

  .inr-qr-img {
    width: 110px;
    height: 110px;
  }

  .inr-bank-table td {
    font-size: 11px;
    padding: 4px 4px;
  }

  .inr-bank-table td:first-child {
    font-size: 10px;
    width: 48px;
  }
}